<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>Tell me about your problems&hellip;</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="shrink.screen.css" type="text/css" media="screen" title="Screen CSS Layout" charset="utf-8">
		<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="feed.php" />
		
		<script type="text/javascript" charset="utf-8">
			function $(id)
			{
				return document.getElementById(id);
			}
		
			function setMeta(name, type)
			{
				activateAllMeta(type);
				//var area = document.getElementById('BugBody');
//				alert(area.value.replace(/\[([^\s]*)\s?([^\]]*)\]/, '[' + name + ' ' + type + ']'));
				switch(type) {
					case 'Projects':
					//area.value = area.value.replace(/\[([^\s]*)/, '[' + name);
					$('Project').value = name;
					break;
					
					case 'Categories':
					$('Category').value = name;

					//area.value = area.value.replace(/\s([^\]]*)\]/, ' ' + name + ']');
					break;
				}
				// alert($('Category').value);
				$(type +"_" + name).checked=true;
				
				if(document.getElementById('meta_' + type + '_' + name)) {
					var elm = $('meta_' + type + '_' + name);
					elm.style.fontWeight = 'bold';
				}
			} 
			
			function activateAllMeta(type)
			{
				var metas = document.getElementsByName('meta_' + type);
				for(var idx = 0; idx < metas.length; idx++) {
					metas[idx].style.fontWeight = 'normal';
				}
				
				type = type == 'Projects'?'project':'category';
				var link = $('new_' + type + '_link');
				var field = $('new_' + type);
				hideNew(link, field);
			}
			
			function toggleNew(type)
			{	
				var link = $('new_' + type + '_link');
				var field = $('new_' + type);
				
				if(link.style.display == 'none') { // show link, hide field
					hideNew(link, field);
				} else {                           // other way around
					showNew(link, field);
				}
			}
			
			function showNew(link, field)
			{
				link.style.display = 'none';
				field.style.display = 'block';
				field.focus();
			}
			
			function hideNew(link, field)
			{
				link.style.display = 'block';
				field.style.display = 'none';
				field.blur();
				field.value = '';

			}
		</script>
	</head>

	<body style="">
		<a href="?" id="head"><h1>Bug<span style="letter-spacing:-0.2em">S</span>hrink</h1></a>

		<div id="shrinkState">
			<ul>
				<li><a href="?state=open">Show All Open Bugs</a></li>
				<li><a href="?state=closed">Show All Closed Bugs</a></li>
				<li><a href="?state=all">Show All Bugs</a></li>
			</ul>
		</div>